package com.zhang.authoritycenter.common.model.dto.organization;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * description
 *
 * @author zhangFanJun
 * @date 2023-12-18 17:54
 **/
@Data
public class AddUserReqDTO implements Serializable {

    private Long id;
    /**
     * 账号
     */
    private String username;
    /**
     * 真实姓名
     * */
    private String realName;
    /**
     * 昵称
     */
    private String nickName;
    /**
     * 密码
     */
    @Length(min = 6,message = "密码至少6位数")
    @NotNull
    private String password;
    /**
     * 手机号
     */
    @NotNull
    @Pattern(regexp = "^1[3,4,5,7,8]\\d{9}$",message = "手机的格式不正确")
    private String mobile;
    /**
     * 状态 (0：禁用 1启用)
     */
    private Integer status;
    /**
     * 主部门id
     */
    private Long organizationId;
    /**
     * 工号
     */
    private String jobNumber;
    /**
     * 角色
     * */
    @NotNull
    @NotEmpty
    private List<Long> roleIdList;
    /**
     * 组织id
     * */
    @NotNull
    @NotEmpty
    private List<Long> organizationIdList;
}
